
#include "EntryTT.h"
#include <iostream>

#define SPACE "         "

EntryTT::EntryTT(int serial_number)
	: _serial_number(serial_number),
	  _status(THREAD_READY),
	  _acumulated_message_quanta(0),
	  _total_number_delivered_from_last_quantum(0),
	  _priority(0),
	  _current_quanta(0)
{
}

EntryTT::~EntryTT() {
}

void EntryTT::print()
{
	cout << _serial_number << SPACE;
	switch ( _status )
	{
		case THREAD_RUNNING:	cout << "Running ";		break;
		case THREAD_READY:		cout << "Ready   ";		break;
		case THREAD_BLOCKED:	cout << "Blocked ";		break;

	}
	cout << "\t";
	cout << _acumulated_message_quanta << SPACE << "       ";
	cout << _total_number_delivered_from_last_quantum << "                ";
	cout << _priority << SPACE << "    ";
	cout << _current_quanta << endl;
}
